package com.liudadan.controller;

import com.liudadan.pojo.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@RestController
@RequestMapping("user")
public class UserController {

    @GetMapping("getUser")
    public List<User> getUser(){
        List<User> list = new ArrayList<>();
        User user = new User();
        user.setAge(18);
        user.setName("刘大胆");
        list.add( user);
        return list;
    }
}
